<template>
  <div>
    <carousel :list="carouselList"></carousel>
    <my-main :murl="uil.c" :cat="cartoonCat"></my-main>
  </div>
</template>
<script>
  import Carousel from '../components/Carousel'
  import myMain from '../components/Main'
  export default {
    data() {
      return {
        show: true,
        carousel: [],
        uil: {},
        carouselList: [],
        cartoonCat: []

      }
    },
    components: {
      Carousel,
      myMain
    },
    created() {
      this.axios.get('http://u.ishuhui.com/ver')
        .then(data => {
          // console.log(data)
          this.uil = data.data.data
          // console.log(this.uil.c)
          localStorage.setItem('uil',this.uil.c)
          localStorage.setItem('article',this.uil.i)
          localStorage.setItem('shop',this.uil.g)
          localStorage.setItem('anime',this.uil.an)
          return this.axios.get('http://api.ishuhui.com/index/ish/ver/' + this.uil.an + '.json')

        })
        .then(res => {
          // console.log(res)
          this.carousel = res.data.data
          this.carouselList = this.carousel.setting.slide
          this.cartoonCat = this.carousel.cartoonCat
        })
        .catch(err => {
          console.log(err)
        })
    }
  }

</script>
<style scoped>


</style>
